<html>
	<meta http-equiv="Content-type" content="text/http;charset=utf-8"/>
<style type="text/css">
#so
{
height: 22px;
width: 34px;
}
#table1
{
background :aqua;
-webkit-border-radius: 5px;
}
#nut
{
border-top-width: 0px;
border-right-width: 0px;
border-left-width: 0px;
border-bottom-width: 0px;
padding-bottom: 1px;
background:-webkit-linear-gradient(#FF0000,#EE0000);
color:white;
-webkit-box-shadow: 0 5px 42px 13px rgba(204, 100, 100, 1);
-webkit-border-top-left-radius : 10px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius : 10px;
-webkit-border-bottom-left-radius: 4px;
}
#nut:hover
{
background:-webkit-linear-gradient(#CD0000,#8B0000);
color:white;
}
#nut:active
{
position: relative;
top: 2px;
left : 1 px;
}
</style>
	<body>
		<?php
		if(isset($_POST["so"]))
		{
			$so = $_POST["so"];
			if($so == "")
			{
				$chuoi = "nhập số vào con tóóóóóó ! !";
			}
			else if(!is_numeric($so))
			{
				$chuoi = "không được nhập chữ con tóóóóóó ! !";
			}
			
			else 
			
			{
				$chuoi= "";
				for($i = 1 ; $i <= 10; $i ++)
				{
					$tich = $so * $i;
					$chuoi = $chuoi.$so." x ".$i." = ".$tich."\n";
				}
			}
		}
		
			
		?>
		<form id="form1"name="form1"method="post"action="BangCuuChuong.php">
			<table id="table1"align="center">
				<tr>
					<td align="center"colspan="3">BẢNG CỬU CHƯƠNG</td>
				</tr>
				
				<tr>
					<td><span>cửu chương</span></td>
					
					<td><label><input id="so"name="so"type="text"value="<?php 
					if(isset($_POST["so"]))
					{
						echo $_POST["so"];
					}?>"/></label></td>
					
					<td><label><input id="nut"name="nut"type="submit"value="hiện bảng cửu chương"></label></td>
				</tr>
				<tr>
					<td colspan="3" align="center">
					<?php if(isset($_POST["so"])){echo "<br>";?>
					<label>
						<tr>
							<td colspan="3" align="center">KẾT QUẢ</td>
						</tr>
						<tr>
							<td colspan="3" align="center"><?php if(isset($_POST["so"])){echo nl2br($chuoi)."<br>";}?></td>
						</tr>
					</label>
					</td>
					<?php }?>	
				</tr>
			
			
			</table>
		
		</form>
	
	</body>

<html>